.class Les/xy$h1;
.super Ljava/lang/Object;
.source "EditMenuItemProvider.java"

# interfaces
.implements Landroid/view/MenuItem$OnMenuItemClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Les/xy;->d()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic a:Les/xy;


# direct methods
.method constructor <init>(Les/xy;)V
    .locals 0

    .line 1
    iput-object p1, p0, Les/xy$h1;->a:Les/xy;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onMenuItemClick(Landroid/view/MenuItem;)Z
    .locals 8

    .line 1
    iget-object p1, p0, Les/xy$h1;->a:Les/xy;

    invoke-static {p1}, Les/xy;->b(Les/xy;)Ljava/util/List;

    move-result-object p1

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result p1

    const/4 v0, 0x0

    const/4 v1, 0x1

    if-nez p1, :cond_0

    .line 2
    iget-object p1, p0, Les/xy$h1;->a:Les/xy;

    invoke-static {p1}, Les/xy;->a(Les/xy;)Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object p1

    invoke-virtual {p1}, Landroid/app/Activity;->getBaseContext()Landroid/content/Context;

    move-result-object p1

    const v2, 0x7f1104a3

    invoke-static {p1, v2, v0}, Lcom/estrongs/android/ui/view/d;->a(Landroid/content/Context;II)V

    return v1

    .line 3
    :cond_0
    iget-object p1, p0, Les/xy$h1;->a:Les/xy;

    invoke-static {p1}, Les/xy;->b(Les/xy;)Ljava/util/List;

    move-result-object p1

    invoke-interface {p1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/estrongs/fs/g;

    .line 4
    invoke-interface {p1}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object v2

    .line 5
    invoke-static {v2}, Lcom/estrongs/android/util/h0;->d1(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_c

    invoke-static {v2}, Lcom/estrongs/android/util/h0;->a2(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_c

    .line 6
    invoke-static {v2}, Lcom/estrongs/android/util/h0;->f1(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_c

    .line 7
    invoke-static {v2}, Lcom/estrongs/android/util/h0;->D2(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_1

    goto/16 :goto_4

    .line 8
    :cond_1
    invoke-static {v2}, Lcom/estrongs/android/util/h0;->n2(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_2

    .line 9
    new-instance v0, Lcom/estrongs/android/ui/dialog/j0;

    iget-object v3, p0, Les/xy$h1;->a:Les/xy;

    invoke-static {v3}, Les/xy;->a(Les/xy;)Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object v3

    invoke-interface {p1}, Lcom/estrongs/fs/g;->getName()Ljava/lang/String;

    move-result-object p1

    invoke-direct {v0, v3, v2, p1}, Lcom/estrongs/android/ui/dialog/j0;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {v0}, Lcom/estrongs/android/ui/dialog/j0;->b()V

    goto/16 :goto_5

    .line 10
    :cond_2
    invoke-static {v2}, Lcom/estrongs/android/util/h0;->w0(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_3

    .line 11
    new-instance v0, Lcom/estrongs/android/ui/dialog/e0;

    iget-object v3, p0, Les/xy$h1;->a:Les/xy;

    invoke-static {v3}, Les/xy;->a(Les/xy;)Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object v3

    invoke-interface {p1}, Lcom/estrongs/fs/g;->getName()Ljava/lang/String;

    move-result-object p1

    invoke-direct {v0, v3, v2, p1}, Lcom/estrongs/android/ui/dialog/e0;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {v0}, Lcom/estrongs/android/ui/dialog/e0;->a()V

    goto/16 :goto_5

    .line 12
    :cond_3
    invoke-static {v2}, Lcom/estrongs/android/util/h0;->H1(Ljava/lang/String;)Z

    move-result p1

    if-eqz p1, :cond_d

    .line 13
    invoke-static {v2}, Lcom/estrongs/android/util/h0;->K(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    const-string v3, "box"

    .line 14
    invoke-virtual {p1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_b

    const-string v3, "onedrive"

    .line 15
    invoke-virtual {p1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_b

    const-string v3, "gdrive"

    invoke-virtual {p1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_b

    const-string v3, "dropbox"

    .line 16
    invoke-virtual {p1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_b

    const-string v3, "vdisk"

    .line 17
    invoke-virtual {p1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_4

    goto/16 :goto_3

    .line 18
    :cond_4
    new-instance v4, Lcom/estrongs/android/ui/adapter/a;

    iget-object v5, p0, Les/xy$h1;->a:Les/xy;

    invoke-static {v5}, Les/xy;->a(Les/xy;)Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object v5

    invoke-direct {v4, v5}, Lcom/estrongs/android/ui/adapter/a;-><init>(Landroid/content/Context;)V

    const/4 v5, 0x0

    .line 19
    :goto_0
    invoke-virtual {v4}, Lcom/estrongs/android/ui/adapter/a;->getCount()I

    move-result v6

    const/4 v7, -0x1

    if-ge v5, v6, :cond_6

    .line 20
    invoke-virtual {v4, v5}, Lcom/estrongs/android/ui/adapter/a;->c(I)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {p1, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_5

    goto :goto_1

    :cond_5
    add-int/lit8 v5, v5, 0x1

    goto :goto_0

    :cond_6
    const/4 v5, -0x1

    :goto_1
    if-ne v5, v7, :cond_7

    .line 21
    iget-object p1, p0, Les/xy$h1;->a:Les/xy;

    invoke-static {p1}, Les/xy;->a(Les/xy;)Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object p1

    const-string v2, "Unknown netdisk type"

    invoke-static {p1, v2, v0}, Lcom/estrongs/android/ui/view/d;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    .line 22
    iget-object p1, p0, Les/xy$h1;->a:Les/xy;

    invoke-static {p1}, Les/xy;->a(Les/xy;)Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object p1

    invoke-virtual {p1}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->R()V

    return v1

    .line 23
    :cond_7
    invoke-static {v2}, Lcom/estrongs/android/util/h0;->n0(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    const-string v6, "pcs"

    .line 24
    invoke-virtual {p1, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_8

    .line 25
    new-instance p1, Les/xy$h1$a;

    invoke-direct {p1, p0}, Les/xy$h1$a;-><init>(Les/xy$h1;)V

    .line 26
    new-instance v3, Lcom/estrongs/android/ui/pcs/e;

    iget-object v6, p0, Les/xy$h1;->a:Les/xy;

    invoke-static {v6}, Les/xy;->a(Les/xy;)Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object v6

    invoke-direct {v3, v6, v1, v2}, Lcom/estrongs/android/ui/pcs/e;-><init>(Landroid/content/Context;ZLjava/lang/String;)V

    .line 27
    invoke-virtual {v3, p1}, Lcom/estrongs/android/ui/pcs/e;->a(Lcom/estrongs/android/ui/pcs/e$c;)V

    .line 28
    invoke-virtual {v4, v5}, Lcom/estrongs/android/ui/adapter/a;->a(I)I

    move-result p1

    .line 29
    invoke-virtual {v4, v5}, Lcom/estrongs/android/ui/adapter/a;->b(I)Ljava/lang/String;

    move-result-object v4

    .line 30
    invoke-virtual {v3, p1, v4}, Lcom/estrongs/android/ui/pcs/e;->a(ILjava/lang/String;)V

    .line 31
    invoke-static {}, Lcom/estrongs/android/pop/l;->L1()Lcom/estrongs/android/pop/l;

    move-result-object p1

    .line 32
    invoke-virtual {p1, v2}, Lcom/estrongs/android/pop/l;->s(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    .line 33
    invoke-virtual {v3, v0, p1}, Lcom/estrongs/android/ui/pcs/e;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 34
    invoke-virtual {v3}, Lcom/estrongs/android/ui/pcs/e;->show()V

    return v1

    .line 35
    :cond_8
    new-instance v6, Lcom/estrongs/android/ui/dialog/i0;

    iget-object v7, p0, Les/xy$h1;->a:Les/xy;

    invoke-static {v7}, Les/xy;->a(Les/xy;)Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object v7

    invoke-direct {v6, v7}, Lcom/estrongs/android/ui/dialog/i0;-><init>(Landroid/content/Context;)V

    invoke-virtual {v4, v5}, Lcom/estrongs/android/ui/adapter/a;->b(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v6, v4, p1}, Lcom/estrongs/android/ui/dialog/i0;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/estrongs/android/ui/dialog/i0;

    .line 36
    invoke-virtual {p1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_a

    const-string p1, "s_"

    .line 37
    invoke-virtual {v0, p1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result p1

    const/4 v3, 0x2

    if-eqz p1, :cond_9

    .line 38
    invoke-virtual {v0, v3}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_2

    :cond_9
    const-string p1, "l_"

    .line 39
    invoke-virtual {v0, p1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result p1

    if-eqz p1, :cond_a

    .line 40
    invoke-virtual {v0, v3}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    .line 41
    :cond_a
    :goto_2
    invoke-static {}, Lcom/estrongs/android/pop/l;->L1()Lcom/estrongs/android/pop/l;

    move-result-object p1

    .line 42
    invoke-virtual {p1, v2}, Lcom/estrongs/android/pop/l;->s(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    .line 43
    invoke-virtual {v6, v0, p1}, Lcom/estrongs/android/ui/dialog/i0;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 44
    invoke-virtual {v6, v2}, Lcom/estrongs/android/ui/dialog/i0;->a(Ljava/lang/String;)V

    .line 45
    invoke-virtual {v6}, Lcom/estrongs/android/ui/dialog/i0;->a()V

    goto :goto_5

    .line 46
    :cond_b
    :goto_3
    new-instance v0, Landroid/content/Intent;

    iget-object v3, p0, Les/xy$h1;->a:Les/xy;

    invoke-static {v3}, Les/xy;->a(Les/xy;)Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object v3

    const-class v4, Lcom/estrongs/android/ui/view/CreateOAuthNetDisk;

    invoke-direct {v0, v3, v4}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v3, "nettype"

    .line 47
    invoke-virtual {v0, v3, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string p1, "editServer"

    .line 48
    invoke-virtual {v0, p1, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    const-string p1, "originalPath"

    .line 49
    invoke-virtual {v0, p1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 50
    iget-object p1, p0, Les/xy$h1;->a:Les/xy;

    invoke-static {p1}, Les/xy;->a(Les/xy;)Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object p1

    invoke-virtual {p1, v0}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->startActivity(Landroid/content/Intent;)V

    goto :goto_5

    .line 51
    :cond_c
    :goto_4
    new-instance v3, Lcom/estrongs/android/ui/dialog/f0;

    iget-object v4, p0, Les/xy$h1;->a:Les/xy;

    invoke-static {v4}, Les/xy;->a(Les/xy;)Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object v4

    invoke-interface {p1}, Lcom/estrongs/fs/g;->getName()Ljava/lang/String;

    move-result-object p1

    invoke-direct {v3, v4, v2, p1, v0}, Lcom/estrongs/android/ui/dialog/f0;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Z)V

    invoke-virtual {v3}, Lcom/estrongs/android/ui/dialog/f0;->a()V

    .line 52
    :cond_d
    :goto_5
    iget-object p1, p0, Les/xy$h1;->a:Les/xy;

    invoke-static {p1}, Les/xy;->a(Les/xy;)Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object p1

    invoke-virtual {p1}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->R()V

    return v1
.end method
